<?php
/* @var $this ChildrenController */
/* @var $model Children */

$this->breadcrumbs=array(
	'[儿童]管理'=>array('admin'),
	'添加[儿童]',
);
//设置页面标题
$this->pageTitle=Yii::app()->name.' - 添加[儿童]';
$this->contentTitle='添加[儿童]';
?>
<!--表单内容-->
<?php $form=$this->beginWidget('CActiveForm', array(
	'id'=>'children-form',
	'enableAjaxValidation'=>false,
        'enableClientValidation'=>true,
        'clientOptions'=>array(
            'validateOnSubmit'=>true
        ),
    'htmlOptions'=>array('class'=>'ajax_form'),
)); ?>
<table cellspacing="1" class="myform">
	<tr>
		<td align="right">家长序号*</td>
		<td>
			<?php echo $form->textField($model,'party_id',array('class'=>'fl input')); ?>
			<?php echo $form->error($model,'party_id'); ?>
		</td>
	</tr>

	<tr>
		<td align="right"><?php echo $form->labelEx($model,'username'); ?></td>
		<td>
			<?php echo $form->textField($model,'username',array('size'=>5,'maxlength'=>5,'class'=>'fl input')); ?>
			<?php echo $form->error($model,'username'); ?>
		</td>
	</tr>

	<tr>
		<td align="right"><?php echo $form->labelEx($model,'sex'); ?></td>
		<td>
                        <?php echo $form->dropDownList($model,'sex',array('男'=>'男','女'=>'女'),
                                    array()); ?> 
			<?php echo $form->error($model,'sex'); ?>
		</td>
	</tr>

	<tr>
		<td align="right"><?php echo $form->labelEx($model,'age'); ?></td>
		<td>
			<?php echo $form->textField($model,'age',array('class'=>'fl input')); ?>
			<?php echo $form->error($model,'age'); ?>
		</td>
	</tr>

	<tr>
		<td align="right"><?php echo $form->labelEx($model,'grade'); ?></td>
		<td>
			<?php echo $form->textField($model,'grade',array('size'=>60,'maxlength'=>255,'class'=>'fl input')); ?>
			<?php echo $form->error($model,'grade'); ?>
		</td>
	</tr>

	<tr>
		<td align="right"><?php echo $form->labelEx($model,'school'); ?></td>
		<td>
			<?php echo $form->textField($model,'school',array('size'=>60,'maxlength'=>255,'class'=>'fl input')); ?>
			<?php echo $form->error($model,'school'); ?>
		</td>
	</tr>

	<tr>
        <td align="right"></td>
        <td>
            <input class="but" type="submit" name="yt0" value="提 交" />        </td>
    </tr>
</table>
  <?php 
        if(Yii::app()->user->getFlash('error_party')){
        echo "<script>art.dialog({icon:'error',content:'家长序号不正确！',time:1});</script>";
        }    
    ?>
<?php $this->endWidget(); ?>
<!--表单内容-->
